package com.jn.gsondemo.views;

import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;


import com.google.gson.Gson;
import com.jn.gsondemo.R;
import com.jn.gsondemo.base.BaseActivity;
import com.jn.gsondemo.entity.Book;
import com.jn.gsondemo.utils.FileUtils;

public class WebActivity extends BaseActivity {

    @Override
    public int getLayoutId() {
        return R.layout.activity_web;
    }

    @Override
    public void init() {
        String title = getIntent().getStringExtra("title");
        String link = getIntent().getStringExtra("link");
        ((TextView) findViewById(R.id.tv_title_name)).setText(title);
        WebView webview = findViewById(R.id.webview);
        webview.loadUrl(link);
        findViewById(R.id.iv_left_back).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });


    }
}